Skip to content

inky: fix blend precision, height quirk, and minor cleanups - #117

Open
caglar10ur wants to merge 2 commits into
periph:mainfrom
caglar10ur:blend
Open

caglar10ur wants to merge 2 commits into
periph:mainfrom
caglar10ur:blend

Conversation

@caglar10ur

Copy link
Copy Markdown
Contributor
  • Fix color blending truncation in blend(): compute the full weighted sum as float64 before casting to uint8, avoiding double truncation
  • Fix UC8159 on IMPRESSION57 incorrectly reporting height as 447; correct it to 448 in DetectOpts
  • Add Opts.String() for human-readable option printing
  • Refactor update() if/else chain to a switch statement
  • Add TestDevImpression_BlendPrecision to cover the blend fix

@codecov

codecov Bot commented May 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 30.76923% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.7%. Comparing base (60d2fb2) to head (cc9d052).

Files with missing lines Patch % Lines
inky/impression.go 44.4% 5 Missing ⚠️
inky/opts.go 0.0% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #117     +/-   ##
=======================================
+ Coverage   54.6%   54.7%   +0.1%     
=======================================
  Files        127     127             
  Lines      12333   12335      +2     
=======================================
+ Hits        6736    6753     +17     
+ Misses      5227    5211     -16     
- Partials     370     371      +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

  - Fix color blending truncation in blend(): compute the full weighted
    sum as float64 before casting to uint8, avoiding double truncation
  - Fix UC8159 on IMPRESSION57 incorrectly reporting height as 447;
    correct it to 448 in DetectOpts
  - Add Opts.String() for human-readable option printing
  - Refactor update() if/else chain to a switch statement
  - Add TestDevImpression_BlendPrecision to cover the blend fix

Signed-off-by: Çağlar Onur <caglar@10ur.org>
Signed-off-by: Çağlar Onur <caglar@10ur.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant